/*
 * @Date: 2023-12-28 16:03:15
 * @LastEditors: lyx
 * @LastEditTime: 2023-12-28 16:06:03
 * @FilePath: \mt-middleware-server\src\feishu\dto\create-tenant-access-token.dto.ts
 * @Description:
 */
import { ApiProperty } from '@nestjs/swagger';
import { IsNotEmpty, IsNumber } from 'class-validator';

export class CreateTenantAccessToken {
  @ApiProperty({
    description: '自建应用 appId',
    example: 'cli_a5e43374e1e12345',
  })
  @IsNotEmpty({ message: '自建应用appId不能为空' })
  appId: string;
  @ApiProperty({
    description: '自建应用 accessToken',
    example: 'mHuxFg6YMtMQOspCXCkIJhTBEkpxAjTm',
  })
  @IsNotEmpty({ message: '自建应用accessToken不能为空' })
  accessToken: string;
  @ApiProperty({
    description: '自建应用 accessToken 有效时长，单位为秒',
    example: 7200,
  })
  @IsNotEmpty({ message: '自建应用accessToken不能为空' })
  @IsNumber({}, { message: '请输入正确的 expire' })
  expire: number;
}
